package com.lagou.kafka.service;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class KafkaService {
    @KafkaListener(topics = "tp_individual")
    public void onMessage(ConsumerRecord record) {
        if (record != null) {
            System.out.println(record.value());
        }
    }
}
